<template>
  <div>
    <div class="title">Neovis_水利可视化知识图谱demo</div>
    <div class="neo-box">
      <div ref="viz" id="viz" style="width: 1280px; height: 720px"></div>
    </div>
  </div>

</template>

<script setup>
import NeoVis from "neovis.js/dist/neovis";
import { onMounted, ref } from "vue";
const config = ref({
  containerId: "viz",
  neo4j: {
    serverUrl: "bolt://47.98.117.127:7687",
    serverUser: "neo4j",
    serverPassword: "849654649Cjh!",
  },
  labels: {
    // person: {label: "person"},
    // location: {label: "location"},
    HydroNode:{label:"name"},


  },
  relationships: {

    "同学": {
      "thickness": 2,
      "color": "#ff0000",
      "caption": "gr"
    },
  },
  initialCypher: "MATCH (n)-[r]->(m) RETURN n, r, m", //查询语句
});
 onMounted(() => {
   const vis = new NeoVis(config.value);
   vis.render();
 });
</script>